<?php

namespace app\middleware;

class AuthLogin
{
    public function handle($request, \Closure $next)
    {
        if (!$request->session('user')) {
            return redirect('/login');
        }

        return $next($request);
    }
}